package com.xiaoshou.action;


import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Results;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.stereotype.Controller;

import com.xiaoshou.pojo.Questiontype;

@Controller
@Results({ @Result(name = "gotoQuestionTypepage", location = "questiontypepage.jsp", type = "dispatcher", params = {
		"questiontype", "${questiontype}" }) })
public class QuestionTypeAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	private String questionTypesId;
	private Questiontype questiontype;

	@Override
	public String execute() throws Exception {
		return null;
	}

	@Action("gotoquestiontype")
	public String gontoQuestionTypePage() {
		System.out.println(questionTypesId);
		questiontype = getQuestionTypeService().findQuesionTypeById(
				questionTypesId);
		System.out.println(questiontype.getQuestions());
		return "gotoQuestionTypepage";
	}

	public String getQuestionTypesId() {
		return questionTypesId;
	}

	public void setQuestionTypesId(String questionTypesId) {
		this.questionTypesId = questionTypesId;
	}

	public Questiontype getQuestiontype() {
		return questiontype;
	}

	public void setQuestiontype(Questiontype questiontype) {
		this.questiontype = questiontype;
	}

}
